#ifndef MAINDIALOG_H
#define MAINDIALOG_H

#include <QDialog>
#include <QTcpServer>

QT_BEGIN_NAMESPACE
namespace Ui { class MainDialog; }
QT_END_NAMESPACE

class MainDialog : public QDialog
{
    Q_OBJECT

public:
    MainDialog(QWidget *parent = nullptr);
    ~MainDialog();

private slots:
    void acceptConnection();

    void on_btnSend_clicked();
    void recvMsg();
    void connectClosed();

private:
    Ui::MainDialog *ui;
    QTcpServer* m_sock;
    QList<QTcpSocket*> m_clients;
};
#endif // MAINDIALOG_H
